package com.gxa.modules.communityManagement.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gxa.modules.communityManagement.form.HousingManagementForm;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@TableName("p_housing_management")
public class HousingManagement implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    @TableField("building_name")
    private String buildingName;
    @TableField("unit_name")
    private String unitName;
    @TableField("room_number")
    private String roomNumber;
    @TableField("house_status")
    private String houseStatus;
    @TableField("house_use")
    private String houseUse;
    @TableField("usable_area")
    private String usableArea;
    @TableField("house_type")
    private String houseType;
    @TableField("built_area")
    private String builtArea;
    @TableField("shared_area")
    private String sharedArea;
    @TableField("carport_number")
    private Integer carportNumber;
    @TableField("storage_room")
    private Integer storageRoom;
    private String note;
    @TableField("community_id")
    private Integer communityId;

    public HousingManagement(HousingManagementForm housingManagementForm) {
        this.id = housingManagementForm.getId();
        this.buildingName = housingManagementForm.getBuildingName();
        this.unitName = housingManagementForm.getUnitName();
        this.roomNumber = housingManagementForm.getRoomNumber();
        this.houseStatus = housingManagementForm.getHouseStatus();
        this.houseUse = housingManagementForm.getHouseUse();
        this.usableArea = housingManagementForm.getUsableArea();
        this.houseType = housingManagementForm.getHouseType();
        this.builtArea = housingManagementForm.getBuiltArea();
        this.sharedArea = housingManagementForm.getSharedArea();
        this.carportNumber = housingManagementForm.getCarportNumber();
        this.storageRoom = housingManagementForm.getStorageRoom();
        this.note = housingManagementForm.getNote();
        this.communityId = housingManagementForm.getCommunityId();
    }
}
